Component({
  properties: {
    value: {
      type: Number,
      value: 0
    },
    readonly: {
      type: Boolean,
      value: false
    }
  },
  data: {},
  methods: {
    redeHander(e) {
      if (!this.data.readonly) {
        let value = e.currentTarget.dataset.index + 1
        this.setData({
          value: value
        })
        this.triggerEvent('onChange', value)
      }
    }
  }
})